package nc.ui.ewm.workorder;

import java.util.Collection;
import java.util.Iterator;

import nc.ui.am.pagination.IPaginationQueryService;
import nc.vo.ewm.proxy.EwmProxy;
import nc.vo.ewm.workorder.WorkOrderHeadVO;
import nc.vo.ewm.workorder.WorkorderBillVO;
import nc.vo.pub.BusinessException;
import nc.vo.pub.SuperVO;

public class WorkOrderPaginationQryService implements IPaginationQueryService {


	public Object[] queryObjectByPks(String[] pks) throws BusinessException {
		Collection clVOs = EwmProxy.getWorkOrder().queryWorkOrderByPks(WorkOrderHeadVO.class, pks);
		Iterator<SuperVO> iter = clVOs.iterator();
		WorkorderBillVO[] workOrderBillVo = new WorkorderBillVO[clVOs.size()];
		int i = 0;
		while (iter.hasNext()) {
			workOrderBillVo[i] = new WorkorderBillVO();
			workOrderBillVo[i].setHeadVO(iter.next());
			i++;
		}
		return workOrderBillVo;
	}

}
